#ifndef SKELETONALGO_H_INCLUDED
#define SKELETONALGO_H_INCLUDED

#include "common.h"
#include "matrixManagement.h"

#define SKEL_MARGINS 2
#define SKEL_MAX_SIZE 25000

//! \brief Skeleton handling class
//!
//! This class handles all the skeleton operations, it initializes, processes
//! and stores the skeleton mask which will be drawn on screen.

class Skeleton
{
    public:
        Skeleton(bool** objMask, Area objArea);

        void process();
        bool cleanGH_AFP1();
        bool cleanGH_ZS84();
        bool cleanGH89();
        bool cleanDistance();
        bool cleanTohme();
        bool cleanHilditch();
        bool cleanCarteDistance();
        bool cleanCarteDistance2();
        bool cleanChanfrein();
        ~Skeleton();

        //! \brief Skeleton mask accessor
        inline bool** getSkMask() const {return m_skMask;}

    private:
        bool** m_skMask;        //Boolean mask of the skeleton
        bool** m_skMaskAlt;     //Mem copy of m_skMask
        SArea m_skArea;
};
void printMatrix(bool** m,SArea mArea, int n);
void printP(bool* P);
void printMatrixInt(int** m,SArea mArea);
#endif // SKELETONALGO_H_INCLUDED
